<% cache([topic, topic.user_avatar_raw, suggest]) do %>
  <div class="topic media topic-<%= topic.id %>" data-prefetch="<%= main_app.topic_path(topic) %>">
    <div class="avatar">
      <%= user_avatar_tag(topic.user, :md) %>
    </div>
    <div class="infos media-body">
      <div class="title media-heading">
        <%= link_to((topic.is_article? ? main_app.article_path(topic) : main_app.topic_path(topic)), title: topic.title) do %>
          <%= raw content_tag(:span, topic.is_article? ? topic.column.name :    topic.node_name, class: topic.is_article? ? 'column-node' :   'node') %>
          <%= topic.title %>
        <% end %>
        <% if suggest %>
          <i class="fa fa-pin" title="置顶"></i>
        <% end %>
        <%= topic_excellent_tag(topic) %>
        <%= topic_close_tag(topic) %>
      </div>
      <div class="info">
        <%= user_name_tag(topic.user) %>
        <span class="hidden-mobile">
          •
          <% if topic.last_reply_user_login.blank? %>
            <%= raw t("common.created_at", time: timeago(topic.created_at))%>
          <% else %>
            <%= t("common.last_by")%> <%= user_name_tag(topic.last_reply_user) %> <%= raw t("common.reply_at", time: timeago(topic.replied_at))%>
          <% end %>
        </span>
      </div>
    </div>
      <% if topic.replies_count > 0 %>
    <div class="count media-right">
        <%= link_to(topic.replies_count,"#{main_app.topic_path(topic)}#reply-#{topic.last_reply_id}", class: "state-false") %>
    </div>
    <% end %>
  </div>
<% end %>
